package com.ktgj.customer.service;

import java.util.List;
import com.ktgj.customer.domain.BusinessOrder;
import com.ktgj.customer.domain.dto.CustomerCardOrderDTO;
import com.ktgj.customer.domain.vo.CustomerCardOrderListVO;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Service接口
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
public interface IBusinessOrderService 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单ID
     * @return 订单
     */
    public BusinessOrder selectBusinessOrderById(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param businessOrder 订单
     * @return 订单集合
     */
    public List<BusinessOrder> selectBusinessOrderList(BusinessOrder businessOrder);

    /**
     * 新增订单
     * 
     * @param businessOrder 订单
     * @return 结果
     */
    public int insertBusinessOrder(BusinessOrder businessOrder);

    /**
     * 修改订单
     * 
     * @param businessOrder 订单
     * @return 结果
     */
    public int updateBusinessOrder(BusinessOrder businessOrder);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单ID
     * @return 结果
     */
    public int deleteBusinessOrderByIds(Long[] orderIds);

    /**
     * 删除订单信息
     * 
     * @param orderId 订单ID
     * @return 结果
     */
    public int deleteBusinessOrderById(Long orderId);

    /**
     * 新增订单及子订单
     *
     * @param businessOrder
     * @return
     */
    public int insertBusinessOrderAndSub(BusinessOrder businessOrder);

    /**
     * 根据订单状态查询
     * */
    public List<BusinessOrder> selectBusinessOrderByOrderState(Long customerId, String orderState);

    /**
     * 查询我的全部订单
     * */
    public List<BusinessOrder> selectBusinessOrderByCustomerIdAndOrderState(Long customerId);

    /**
     * 根据订单号查询会员Id(远程)
     * */
    public BusinessOrder selectBusinessOrderByOrdernum(String ordernum);

    int updateBillQRCode(String orderNum, String billQRCode);

    String getBillQRCode(String orderNum);

    /**
     * 会员购卡订单列表
     * @param customerCardOrder
     * @return
     */
    public List<CustomerCardOrderListVO> customerCardOrderList(CustomerCardOrderDTO customerCardOrder);
}
